package ModelLayer;

import DBLayer.GetMax;
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

public class Invoice {

	
	public Invoice(){
		
		invNo=GetMax.getMaxId("Select max(Inv_No) from Invoice")+1;
		payDate=getDateTime() ;
		
	}
	
	
	public Invoice(int invNo) {
		this.invNo=invNo;
	}


	private int invNo;
	private String payDate;
	private double fAmount;
	
	
	
	public int getInvNo() {
		return invNo;
	}
	public void setInvNo(int invNo) {
		this.invNo = invNo;
	}
	public String getPayDate() {
		return payDate;
	}
	public void setPayDate(String payDate) {
		this.payDate = payDate;
	}
	public double getfAmount() {
		return fAmount;
	}
	public void setfAmount(double fAmount) {
		this.fAmount = fAmount;
	}
	
	


    private String getDateTime() {
        DateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy");
        Date date = new Date();
        return dateFormat.format(date);
    }
	
	
}//end clas
